package cn.ad.server.persistence.dao;

import cn.ad.server.domain.ad.GeoCountry;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface GeoCountryDao {
	
	@Results(value = { @Result(column = "id", property = "id", id = true),
		@Result(column = "update_time", property = "updateTime") })
	@Select("select * from geo_country")
	List<GeoCountry> findAll();
	
	@Results(value = { @Result(column = "id", property = "id", id = true),
			@Result(column = "update_time", property = "updateTime") })
	@Select("select * from geo_country where id = #{value}")
	GeoCountry findById(long id);

}
